﻿<UserControl x:Class="Airborne.ScrumPoker.Module.ProductOwner.Views.TimerDetailView"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
     xmlns:presentationOptions="http://schemas.microsoft.com/winfx/2006/xaml/presentation/options"         
    xmlns:converter="clr-namespace:Airborne.ScrumPoker.Module.Converters;assembly=Airborne.ScrumPoker.Module"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
    mc:Ignorable="d presentationOptions"
    Height="Auto" Width="Auto"  d:DesignHeight="206.543">
    <UserControl.Resources>
        <converter:BoolInverter x:Key="boolInverter" />
        <converter:ColourTimerConverter x:Key="colourConverter"/>
    </UserControl.Resources>
    
     
    
        <Grid VerticalAlignment="Top" Height="Auto">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="35"/>
            <RowDefinition Height="35"/>
            <RowDefinition Height="35"/>
            <RowDefinition Height="30"/>
        </Grid.RowDefinitions>
       
        <Border Grid.Row="0" Margin="0,0,0,15" CornerRadius="5" BorderThickness="0.5" BorderBrush="Transparent" Padding="2" Background="Black" Width="Auto" Height="68" HorizontalAlignment="Center" VerticalAlignment="Center">
            <!--<Border.BitmapEffect>
                <OuterGlowBitmapEffect GlowColor="Black" GlowSize="10"/>
            </Border.BitmapEffect>-->
            <!--Text="{Binding Path=CurrentCount}"-->
            <Grid>
                <Image presentationOptions:Freeze="True" Source="pack://application:,,,/Airborne.ScrumPoker.Module;Component/Resources/Images/ClockBackDigitalUpright.png" Stretch="None" HorizontalAlignment="Left" VerticalAlignment="Top" />
                <TextBox VerticalAlignment="Bottom" Grid.Row="0"  BorderThickness="1"
                            BorderBrush="Transparent" 
                            Height="62"
                            Text="{Binding Path=CurrentCount}" 
                            Foreground="{Binding Path=CurrentCount, Converter={StaticResource colourConverter}}"
                            TextAlignment="Right" 
                            FontFamily="pack://application:,,,/Airborne.ScrumPoker.Module;Component/Resources/Fonts/#Digital Readout Upright"
                            FontSize="72"
                            Padding="0,-8,0,0"
                            Margin="0,0,4,0"
                            Background="Transparent"
                            AutomationProperties.AutomationId="textBoxTimer" 
                         />
            </Grid>
        </Border>
       
        <Button Grid.Row="1" Content="Start Timer" AutomationProperties.AutomationId="buttonStartTimer" Click="buttonStartTimerClick" IsEnabled="{Binding Path=TimerStarted, Converter={StaticResource boolInverter}}" Margin="0,0,0,5" Height="30" />
        <Button Grid.Row="2" Content="Stop Timer"  AutomationProperties.AutomationId="buttonStopTimer"  Click="buttonStopTimerClick" IsEnabled="{Binding Path=TimerStarted}" Margin="0,0,0,5" Height="30"/>
        <Button Grid.Row="3" Content="Show Votes"  AutomationProperties.AutomationId="buttonShowVotes"  Click="buttonEndGameClick" IsEnabled="{Binding Path=TimerStarted, Converter={StaticResource boolInverter}}" VerticalAlignment="Top" Height="30" d:LayoutOverrides="Height"/>
        <Button Grid.Row="4" Content="Reset Votes" AutomationProperties.AutomationId="buttonResetVotes"  Click="buttonResetVoteClick" IsEnabled="{Binding Path=TimerStarted, Converter={StaticResource boolInverter}}" Margin="0,0,0,0" Height="30"/>
        
    </Grid>
      
      
        
</UserControl>
